<?php

class WebApplication extends CBehavior {
    
    private $_name;
    
    public function getName(){
        return $this->_name;
    }
    
    public function runEnd($name) {
        $this->_name = $name;
        $this->onWebload = array($this,'changePath');
        $this->onWebLoad(new CEvent($this->owner));
        $this->owner->run();
   
    }
    
    public function onWebLoad($event){
        $this->raiseEvent('onWebLoad', $event);
        
    }
    
    protected function changePath($event){
        $object = $event->sender;
        $object->controllerPath .= DIRECTORY_SEPARATOR.$this->_name;
        $object->viewPath .= DIRECTORY_SEPARATOR.$this->_name;
       
	   // var_dump($object->controllerPath);
    
	
	}
        
    
}

?>
